package com.polly.esphwevent.controller;

import cn.hutool.core.lang.Snowflake;
import com.polly.esphwevent.domain.AuthToken;
import com.polly.esphwevent.domain.HomeworkInfo;
import com.polly.esphwevent.services.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author liqin@nd.com.cn
 * @version V1.0
 * @title: RespondenceController
 * @description: TODO(用一句话描述该文件做什么)
 * @date: 2019/3/22 10:25
 */

@RestController
public class CommentController {

    @Autowired
    private CommentService commentService;

    @RequestMapping(value = "/authcomment", method = RequestMethod.POST)
    public AuthToken drafts(@RequestBody HomeworkInfo hwInfo) {
        Snowflake snowFlake = new Snowflake(1, 2);
        long userId =snowFlake.nextId();

        return commentService.createComment(userId);



    }




}
